home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Audio / Patchmix / Source / PatchView.h < prev    next >
Text File  |  1992-08-01  |  1KB  |  64 lines

  1. // PatchView.h
  2. // By Jayson Adams, NeXT Developer Support Team
  3. // You may freely copy, distribute and reuse the code in this example.
  4. // NeXT disclaims any warranty of any kind, expressed or implied, as to its
  5. // fitness for any particular use.
  6.  
  7. #import <appkit/View.h>
  8. #import "UnitGen.h"
  9.  
  10. #define     UGENS             26
  11. #define     NONE            0
  12. #define    MOVING            1
  13. #define    SETTING         2
  14. #define    CONNECTING    3
  15.  
  16. @interface PatchView:View
  17. {
  18.         id         currentImage;
  19.     int        ugenType;
  20.         id           delegate;
  21.     id        screenImage;     // off-screen buffer
  22.     NXPoint currentUgenCenter;
  23.     BOOL    connecting;
  24.     BOOL    selecting;
  25.     BOOL    moving;
  26.     BOOL    setting;
  27.     BOOL    firstErase;
  28.     BOOL    ugenselected;
  29.     NXPoint *connPoint1;
  30.     NXPoint *connPoint2;
  31.     NXPoint erasePoint1;
  32.     NXPoint erasePoint2;
  33.     NXPoint *ePoint1;
  34.     NXPoint *ePoint2;
  35.     NXRect    *hrect;
  36.     id        currentUgen;
  37.     id        currentParam;
  38.     id        connUgen1;
  39.     id        connParam1;
  40.     id        eraseParam;
  41.     id        outUgen;
  42.     id        paramVal;
  43.     int     choice;
  44.     int    viewMode;
  45. }
  46.  
  47. /* instance methods */
  48. - setImages;
  49. - windowChanged:newWindow;
  50. - setUgen:(int)uType;
  51. - setDelegate:anObject;
  52. - (BOOL)windowEntered:dragSource;
  53. - (BOOL)windowExited:dragSource;
  54. - (BOOL)windowDropped:dragSource:(NXPoint *)currentLocation;
  55. - erase:sender;
  56. - mouseDraggedAction:(NXPoint *)currentLocation;
  57. - mouseUpAction:(NXPoint *)currentLocation;
  58. - drawSelf:(NXRect *)rects :(int)count;
  59.  
  60. /* delegation methods */
  61. - acceptedWindow:acceptView fromSource:source;
  62.  
  63. @end
  64.